<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>对象的扩展</title>
    <script type="text/javascript">
        const person = {
            abc:"jack",
            cde:21,
            language: ['java','js','css']
        }


        let result = Object.keys(person);

        for(re in result){
            if ("name"==result[re]){
                console.log(person.name);
                break;
            }else if ("age"==result[re]){
                console.log(person.age);
                break;
            }else{
                let len = Object.keys(person).length;

                let index =  parseInt(Math.random()*len)

                console.log(Object.values(person)[index]);
                break;
            }
        }

        // let valueResult = Object.values(person);
        //
        // console.log(result);
        //
        // console.log(valueResult);

    </script>
</head>
<body>

</body>
</html>